var paymentCtrl  = new XFApp.client();

XFApp.client.prototype.payment = {		
		successCode : 10000,	
		urlItems : {
			initListURL: basePath+"/userCenter/accountBill/query",
			paymentSubmitURL: basePath+"/userCenter/accountBill/submit",
		},
		
		event : function (){			
			_this = this;		
			//支付
			$("#payment").on("click",function(){
				
				var params = {
					userWalletId : $("#userWalletId").val(),
					accountBillId : $("#accountBillId").val(),
				}
			    	
			    $.ajax({
						url : _this.urlItems.paymentSubmitURL,
						data : params,
						dataType : "json",
						type : 'post',
						success : function(data) {
							if (data.code == _this.successCode) {
								webAlert({
					                title:'提示',
					                content: data.msg,
					                opacity:.5,
					                bg:"gray",
					                width:300,
					                height:10,
					                button:[
					                        {
					                        name:"确定",
					                        callback:function(){
					                        	window.location = basePath + "/userCenter/accountBill";
					                        	this.close();
					                        }
					                        }]
					            });
								
								
							} else {
								window.webDialogUtil.alert("提示", data.msg);
							}
						}
			    	});
			});			
		},
},


$(function(){
	paymentCtrl.payment.event();	
});